Form Label
Elements

Attribute

Form elements need attributes to function correctly. When creating a form, a label element must match up with an input element using the id and for attributes with the same values in each, respectively. The match ensures that data is transferred properly to its destination.
The action attribute specifies where the form data submission should go to the server.
The method attribute is a request method and has two values, get and post. Get is used to request data from a specific source sent in a URL and post is used to send data to the server destination specified in the action declaration.
Post is used for sensitive and private data.
Another attribute used with forms is novalidate. The novalidate command is a boolean attribute that specifies that the form should not be validated when submitted. When a user submits a form, it is prevented from validation logic with the novalidate attribute used within the form tag or the form itself. This allows the user to save any entered info on the form and continue on later.

Fieldset Legend

The fieldset element groups various controls and labels within the form. One form can have multiple labels and input within a fieldset, and using multiple fieldsets we can create separate forms for various purposes, such as information, feedback, and financial transactions within the same page. The legend element defines a caption for the fieldset element, naming and/or describing the form and its contents.

Label Element
For and Id

Form elements need attributes to function correctly. When creating a form, a label element must match up with an input element using the id and for attributes with the same values in each, respectively. The match ensures that data is transferred properly to its destination when submitted.


SUMMARY

Form submissions can be utilized on the web for various purposes. Gathering information from a user that is conducting a financial transaction for your business, or maybe a survey to target a better audience, or maybe even to register for a marathon, a form is the way to do it. Making sure that everything that the user entered travels to the correct destination and the correct feedback for the UE to easily navigate through your site, is a top priority.